Update behat-data URLs in tests#612
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Code Review
This pull request updates the asset download URLs in the features/site-empty.feature file, migrating them from wp-cli.org to wp-cli.github.io. Feedback was provided to use HTTPS for these URLs to enhance security and to correct the table alignment which was broken by the increased length of the new URLs.
| And download: | ||
| | path | url | | ||
| | {CACHE_DIR}/large-image.jpg | http://wp-cli.org/behat-data/large-image.jpg | | ||
| | {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io/behat-data/large-image.jpg | |
There was a problem hiding this comment.
Consider using https instead of http for the asset URL. GitHub Pages supports HTTPS, which provides better security and avoids potential redirects. Additionally, the table alignment is currently broken because the new URL is longer than the previous one; while the header cannot be modified in this PR, reducing the trailing spaces helps minimize the misalignment.
| {CACHE_DIR}/large-image.jpg | https://wp-cli.github.io/behat-data/large-image.jpg |
| And download: | ||
| | path | url | | ||
| | {CACHE_DIR}/large-image.jpg | http://wp-cli.org/behat-data/large-image.jpg | | ||
| | {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io/behat-data/large-image.jpg | |
There was a problem hiding this comment.
Consider using https instead of http for the asset URL. GitHub Pages supports HTTPS, which provides better security and avoids potential redirects. Additionally, the table alignment is currently broken because the new URL is longer than the previous one; while the header cannot be modified in this PR, reducing the trailing spaces helps minimize the misalignment.
| {CACHE_DIR}/large-image.jpg | https://wp-cli.github.io/behat-data/large-image.jpg |
There was a problem hiding this comment.
Pull request overview
Updates the Behat test fixture download URLs to reflect the new hosting location referenced in the linked wp-cli.org redirect request, keeping the site empty feature tests working after the URL change.
Changes:
- Replace
wp-cli.org/behat-dataURLs withwp-cli.github.io/behat-datain thesite-emptyBehat feature. - Apply the URL update in both the single-site and multisite scenarios within the same feature.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| And download: | ||
| | path | url | | ||
| | {CACHE_DIR}/large-image.jpg | http://wp-cli.org/behat-data/large-image.jpg | | ||
| | {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io/behat-data/large-image.jpg | |
There was a problem hiding this comment.
The URL cell in this Gherkin table has trailing whitespace after large-image.jpg. Depending on how the download step parses table values, this can introduce a malformed URL or make the step harder to read/maintain. Please trim the extra spaces so the cell contains only the URL.
| | {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io/behat-data/large-image.jpg | | |
| | {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io/behat-data/large-image.jpg | |
| And download: | ||
| | path | url | | ||
| | {CACHE_DIR}/large-image.jpg | http://wp-cli.org/behat-data/large-image.jpg | | ||
| | {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io/behat-data/large-image.jpg | |
There was a problem hiding this comment.
This URL cell also includes trailing whitespace after large-image.jpg. Please trim it for consistent table formatting and to avoid any chance of the whitespace being treated as part of the URL by the download step.
See https://make.wordpress.org/systems/2026/04/23/redirect-request-for-wp-cli-org/